package cn.cjxy.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("emp")//指定表名
public class Employee {
    @TableId(value = "e_id",type = IdType.ASSIGN_ID )//指定数据库中的主键
    private Integer id;
    @TableField("name")//解决实体类和数据库字段名不一致
    private String name;
    private Integer age;
    private String addr;
    private Integer dept_id;

}
